#!/usr/bin/env python
# -*- coding: utf-8 -*-

from typing import Any

class ListUtil:
    """
    list工具类
    """

    @staticmethod
    def reverse(_list: list[Any]) -> list[Any]:
        """
        反转list
        """

        if _list is not None and len(_list) > 0:
            new_list: list = list()
            for l in _list:
                new_list.append(l)
            return new_list
        else:
            return None

    @staticmethod
    def is_increasing_list(_list):
        """
        判断数组是否是单调递增
        """

        for i in range(1, len(_list)):
            if _list[i] < _list[i - 1]:
                return False
        return True

    @staticmethod
    def is_decreasing_list(_list):
        """
        判断数组是否是单调递减
        """

        for i in range(1, len(_list)):
            if _list[i] > _list[i - 1]:
                return False
        return True